import request from "@/api/request";
export default {
    //邀请码加入班级
    joinClass:(param,token)=>{
      return request({
          url:`/train/train-user/user/add/class/?inviteCode=${param.inviteCode}`,
          method:'get',
          headers: {'token': token},

      })
    },
    //请求自己的班级
    getTrainClass:(param,token)=>{
        return request({
            url:'/train/train-user/user/class/',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },

    // 根据班级号获取班级的作业
    getHomework:(param,token)=>{
        return request({
            url:'/train/train-user/user/class/homework',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },
    //获取班级的作业
    getHomeworkProblem:(params,token)=>{
        return request({
            url:'/train/train-homework/homework-detail',
            method:'get',
            headers: {'token': token},
            params:{homeworkId: params.homeworkId}
        })
    },
    //获取作业的题目
    getHomeworkProblemId:(params,token)=>{
        return request({
            url:'/train/train-homework/homework-problems',
            method:'get',
            headers: {'token': token},
            params:{homeworkId: params.homeworkId}
        })
    },
    // 根据题号请求作业
    questionDetail:(param,token)=>{
        return request({
            url:'/problem/detail',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },


}